// import moment from 'moment-timezone';
// import _ from 'lodash';

// 检测店铺是否关门
/* export default function checkClose(restaurant) {
  const date = moment().tz(restaurant.timezone);
  const week = date.day();
  const minutes = date.hour() * 60 + date.minute();
  let flag = true;
  _.forEach(restaurant.hours, (item) => {
    if (item.dayOfWeek === week) {
      if (minutes >= item.start && minutes <= item.end) {
        flag = false;
      }
    }
  });
  if (restaurant.closed) {
    flag = true;
  }
  return flag;
} */

/* const moment = require('moment-timezone');

console.log('new Date()===>', new Date());

console.log(moment.tz.guess()); // Asia/Shanghai
const date = moment().tz('America/New_York');
console.log('date===>', date); */

// eslint-disable-next-line no-unused-vars
